import { v4 as uuidv4 } from 'uuid';

export const getUUID = ()=>{
  //  先判断本地存储有无模拟token
  const uuid_token=localStorage.getItem('UUIDTOKEN');
  // 如果不存在则生成一个模拟token，反之直接返回
  if(!uuid_token){
    const new_uuid_token=uuidv4();
    localStorage.setItem('UUIDTOKEN',new_uuid_token)
  }
  return uuid_token;
}